package com.xian.minespring.jdbc.tx;

import java.sql.Connection;

public class TransactionalUtils {

    public static Connection getCurrentConnection() {
        TransactionStatus transactionStatus = DataSourceTransactionManager.TRANSACTION_STATUS_THREAD_LOCAL.get();
        return transactionStatus == null ? null : transactionStatus.connection;
    }
}
